
noinst_LTLIBRARIES += \
	Libraries/libgtest.la

Libraries_libgtest_la_SOURCES = \
	Source/ThirdParty/gtest/include/gtest/gtest.h \
	Source/ThirdParty/gtest/include/gtest/gtest-death-test.h \
	Source/ThirdParty/gtest/include/gtest/gtest-message.h \
	Source/ThirdParty/gtest/include/gtest/gtest-param-test.h \
	Source/ThirdParty/gtest/include/gtest/gtest_pred_impl.h \
	Source/ThirdParty/gtest/include/gtest/gtest_prod.h \
	Source/ThirdParty/gtest/include/gtest/gtest-spi.h \
	Source/ThirdParty/gtest/include/gtest/gtest-test-part.h \
	Source/ThirdParty/gtest/include/gtest/gtest-typed-test.h \
	Source/ThirdParty/gtest/include/gtest/internal/gtest-death-test-internal.h \
	Source/ThirdParty/gtest/include/gtest/internal/gtest-filepath.h \
	Source/ThirdParty/gtest/include/gtest/internal/gtest-internal.h \
	Source/ThirdParty/gtest/include/gtest/internal/gtest-linked_ptr.h \
	Source/ThirdParty/gtest/include/gtest/internal/gtest-param-util-generated.h \
	Source/ThirdParty/gtest/include/gtest/internal/gtest-param-util.h \
	Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h \
	Source/ThirdParty/gtest/include/gtest/internal/gtest-string.h \
	Source/ThirdParty/gtest/include/gtest/internal/gtest-tuple.h \
	Source/ThirdParty/gtest/include/gtest/internal/gtest-type-util.h \
	Source/ThirdParty/gtest/src/gtest-all.cc

# Use -isystem gcc flag so that gcc considers gtest headers as system headers.
# We need this to avoid a lot of compile warnings due to -Wundef.
# See http://code.google.com/p/googletest/issues/detail?id=258
Libraries_libgtest_la_CPPFLAGS = \
	$(global_cppflags) \
	$(javascriptcore_cppflags) \
	-isystem $(srcdir)/Source/ThirdParty/gtest \
	-isystem $(srcdir)/Source/ThirdParty/gtest/include \
	-I$(srcdir)/Source/WTF \
	-I$(srcdir)/Source/ThirdParty/gtest \
	-I$(srcdir)/Source/ThirdParty/gtest/include

if TARGET_WIN32
Libraries_libgtest_la_CXXFLAGS = -DGTEST_HAS_PTHREAD=0
else
Libraries_libgtest_la_CXXFLAGS = -DGTEST_HAS_PTHREAD=1
Libraries_libgtest_la_LIBADD = \
	-lpthread
endif

# gtest source files that we don't compile directly.  They are
# #included by gtest-all.cc.
EXTRA_DIST += \
	Source/ThirdParty/gtest/src/gtest.cc \
	Source/ThirdParty/gtest/src/gtest-death-test.cc \
	Source/ThirdParty/gtest/src/gtest-filepath.cc \
	Source/ThirdParty/gtest/src/gtest-internal-inl.h \
	Source/ThirdParty/gtest/src/gtest-port.cc \
	Source/ThirdParty/gtest/src/gtest-test-part.cc \
	Source/ThirdParty/gtest/src/gtest-typed-test.cc

